package com.kum.domain.constant;

/**
 * @version V1.0
 * @Package com.kum.domain.constant
 * @auhter 枯木Kum
 * @date 2021/6/19-3:20 PM
 * <p>脚本类常数</p>
 */
public class ScriptConstant {

    /**
     * 启用脚本
     */
    public static final String enable = "0";
    /**
     * 停用脚本
     */
    public static final String disable = "1";
    /**
     * 脚本响应缓存key
     */
    public static final String cacheKey = ":match";
    /**
     * 脚本缓存key
     */
    public static final String scriptKey = ":script";


    public static String getScriptCacheKey(String hostAddress) {
        return getCacheKey(hostAddress, scriptKey);
    }

    public static String getScriptMatchCacheKey(String hostAddress) {
        return getCacheKey(hostAddress, cacheKey);
    }
    public static String getCacheKey(String hostAddress,String suffix) {
        return hostAddress + suffix;
    }


}
